package com.ruoyi.auth.event;

import com.ruoyi.system.api.model.LoginUser;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async;

/**
 * @description: [一句话描述该类的功能]
 * @author: [wangshujun]
 * @createDate: [2020/9/14 17:28]
 * @version: [v1.0]
 */
@Configuration
public class EventListenerConfig {

    @Async
    @EventListener
    public void handleLoginEvnet(LoginEvent loginEvent)  {
        LoginUser loginUser = loginEvent.getLoginUser();
        System.out.println("loginEvent监听处理 = [" + loginUser.getSysUser().getUserName() + "]");
    }
}
